package com.TaskOrganizer.task;

import java.io.Serializable;
import java.util.Date;

import com.TaskOrganizer.managers.TaskPriority;

public class Task implements Serializable {

	private static final long serialVersionUID = -5128898870800324778L;
	private String name, description;
	private TaskPriority priority;
	private Date dateCreated, dueDate;
	private boolean resolved;

	public Task(String name, String description, TaskPriority priority) {
		this.name = name;
		this.description = description;
		this.setPriority(priority);
		this.dateCreated = new Date();
		this.resolved = false;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public TaskPriority getPriority() {
		return priority;
	}

	public void setPriority(TaskPriority priority) {
		this.priority = priority;
	}

	public String toString() {
		return "Name: " + this.name + ", Description: " + this.description
				+ ", Priority: " + this.priority;
	}

	public Date getDueDate() {
		return dueDate;
	}

	public void setDueDate(Date dueDate) {
		this.dueDate = dueDate;
	}

	public Date getDateCreated() {
		return dateCreated;
	}

	public void setDateCreated(Date dateCreated) {
		this.dateCreated = dateCreated;
	}

	public boolean isResolved() {
		return resolved;
	}

	public void setResolved(boolean resolved) {
		this.resolved = resolved;
	}

}
